//
//  SegmentContainView.h
//  mcrmSAAS
//
//  Created by wjxfhxy on 15/7/24.
//  Copyright (c) 2015年 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SegmentAttribute : NSObject

@property(nonatomic,strong) NSString *tag;
@property(nonatomic,strong) NSString *title;
@property(nonatomic,strong) UIImage *headImage;
@property(nonatomic,strong) UIColor *backgroundColor;
@property(nonatomic,strong) UIColor *titleColor;

@end

@class SegmentContainView;

@protocol SegmentContainViewDelegate <NSObject>

@optional

-(void)segmentContainView:(SegmentContainView*)view clickedSegmentWithTag:(NSString*)tag;

@optional

-(NSUInteger)numberOfItemInSegmentContainView:(SegmentContainView*)view;

-(UIView*)segmentContainView:(SegmentContainView*)view viewForItemAtIndex:(NSUInteger)index;

-(void)segmentContainView:(SegmentContainView*)view clickedSegmentAtIndex:(NSUInteger)index;

@end

@interface SegmentContainView : UIView

@property(nonatomic,strong) UIColor *verticalLineColor;

@property(nonatomic,strong) NSArray *item;

@property(nonatomic,weak) id<SegmentContainViewDelegate> delegate;

-(void)reloadItem:(SegmentAttribute*)item;

-(void)reloadAtIndex:(NSUInteger)index;

-(void)reloadItem;

@end
